/*
 * Scaffold Application Framework
 *
 * Copyright (c) 2010 Sii Sp. z o.o. All rights reserved.
 */

package com.rstrulak.dao;

import java.util.List;

import com.rstrulak.constant.GenericFilter;
import com.rstrulak.constant.PresentationInfo;
import com.rstrulak.core.dao.GenericDao;
import com.rstrulak.model.Permission;
import com.rstrulak.model.Role;

/**
 * Application roles and permissions DAO.
 * 
 * @author Jakub Ciechan
 * @version 1.0
 */
public interface RoleDao extends GenericDao<Role, Long> {
    /**
     * Returns list of permissions available in the application. The list is
     * sorted ascending by permission names.
     * 
     * @return Sorted list of all available permissions.
     */
    List<Permission> getAllPermissions();
    List<Permission> getPermisions(final Long roleId, final PresentationInfo presentationInfo);
    List<Permission> getPermisions(PresentationInfo presentationInfo);
    int getPermissinCount(GenericFilter filter);
}
